package com.kyrie.system.mybatis.service;

import java.util.Collection;
import java.util.List;
import java.util.Map;

import com.kyrie.system.mybatis.execption.ServiceException;
import org.springframework.jdbc.core.BatchPreparedStatementSetter;
import org.springframework.jdbc.core.ParameterizedPreparedStatementSetter;
import org.springframework.jdbc.core.RowMapper;
import org.springframework.jdbc.core.SqlOutParameter;
import org.springframework.jdbc.core.SqlParameter;

/***
 * @author wuxiang
 * @date 2020-04-06
 *
 * mybatis通用数据库访问方法
 */
public abstract interface IDefaultService {
    public abstract int insert(String paramString, Object paramObject)
            throws ServiceException;


    public abstract int delete(String paramString, Object paramObject)
            throws ServiceException;


    public abstract int update(String paramString, Object paramObject)
            throws ServiceException;


    public abstract <E> List<E> selectList(String paramString)
            throws ServiceException;

    public abstract <E> List<E> selectList(String paramString, Object paramObject)
            throws ServiceException;

    public abstract <E> List<E> selectList(String paramString, Object paramObject, int paramInt1, int paramInt2)
            throws ServiceException;

    public abstract <T> T selectOne(String paramString, Object paramObject)
            throws ServiceException;

    public abstract Object[] getCommonPaged(String paramString1, String paramString2, Object paramObject, int paramInt1, int paramInt2)
            throws ServiceException;

    public abstract void batchUpdate(String paramString, List<Object[]> paramList, int[] paramArrayOfInt)
            throws ServiceException;

    public abstract int[] batchUpdate(String... paramVarArgs)
            throws ServiceException;

    public abstract void batchUpdate(String paramString, List<Object[]> paramList)
            throws ServiceException;

    public abstract void batchUpdate(String paramString, BatchPreparedStatementSetter paramBatchPreparedStatementSetter)
            throws ServiceException;

    public abstract <T> void batchUpdate(String paramString, Collection<T> paramCollection, int paramInt, ParameterizedPreparedStatementSetter<T> paramParameterizedPreparedStatementSetter)
            throws ServiceException;

    public abstract List<Map<String, Object>> queryList(String paramString, List<Object> paramList, int[] paramArrayOfInt)
            throws ServiceException;

    public abstract <T> List<T> queryList(String paramString, List<Object> paramList, int[] paramArrayOfInt, Class<T> paramClass)
            throws ServiceException;

    public abstract List<Map<String, Object>> queryList(String paramString)
            throws ServiceException;

    public abstract <T> List<T> queryList(String paramString, Class<T> paramClass)
            throws ServiceException;

    public abstract List<Map<String, Object>> queryList(String paramString, Object... paramVarArgs)
            throws ServiceException;

    public abstract <T> List<T> queryList(String paramString, Class<T> paramClass, Object... paramVarArgs)
            throws ServiceException;

    public abstract <T> List<T> queryList(String paramString, List<Object> paramList, Class<T> paramClass)
            throws ServiceException;

    public abstract <T> List<T> queryList(String paramString, List<Object> paramList, RowMapper<T> paramRowMapper)
            throws ServiceException;

    public abstract <T> T queryOneReocrd(String paramString, Class<T> paramClass)
            throws ServiceException;

    public abstract <T> T queryOneReocrd(String paramString, RowMapper<T> paramRowMapper)
            throws ServiceException;

    public abstract <T> T queryOneReocrd(String paramString, List<Object> paramList, Class<T> paramClass)
            throws ServiceException;

    public abstract <T> T queryOneReocrd(String paramString, List<Object> paramList, RowMapper<T> paramRowMapper)
            throws ServiceException;

    public abstract <T> T queryOneReocrd(String paramString, List<Object> paramList, int[] paramArrayOfInt, Class<T> paramClass)
            throws ServiceException;

    public abstract <T> T queryOneReocrd(String paramString, List<Object> paramList, int[] paramArrayOfInt, RowMapper<T> paramRowMapper)
            throws ServiceException;

    public abstract int update(String paramString)
            throws ServiceException;

    public abstract int updateJdbc(String paramString, Object... paramVarArgs)
            throws ServiceException;

    public abstract int update(String paramString, List<Object> paramList)
            throws ServiceException;

    public abstract int update(String paramString, List<Object> paramList, int[] paramArrayOfInt)
            throws ServiceException;

    public abstract Map<String, Object> call(String paramString, boolean paramBoolean, Map<String, Object> paramMap, List<SqlParameter> paramList, List<SqlOutParameter> paramList1)
            throws ServiceException;

    public abstract Map<String, Object> call(String paramString, boolean paramBoolean, Map<String, Object> paramMap, List<SqlParameter> paramList)
            throws ServiceException;

    public abstract String keyCreate(String paramString, Character paramCharacter)
            throws ServiceException;

    public abstract long getSeqByName(String paramString)
            throws ServiceException;

    public abstract String getIdBySeq(Character paramCharacter, long paramLong)
            throws ServiceException;

    public abstract String keyCreatePad15Bit(String paramString, Character paramCharacter)
            throws ServiceException;
}

